const path = require('path')

const resolveFn = p => path.resolve(__dirname, p)

module.exports = {
    mode: 'development',
    entry: resolveFn('./client/main.js'),//入口文件
    output: {
        filename: 'main.js', //设置打包后的文件名
        path: resolveFn('./dist/')//设置构建结果的输出目录
    },
    module: {
        rules: [{
                test: /\.(jsx|js)?$/,
                loader: 'babel-loader',
                exclude: /node_modules/
            }
        ]
    }
}